Repository navigation
Commit 05a6245
committed
BUG: Fix missing "server_close" method on SAMPHubProxy
It's possible this bug has existed for a long time and was just hidden.
Another possibility is it appeared at some point during refactoring, but
as far as I can tell it's been around a long time.
The `SAMPWebClient.hub` attribute is still just a `SAMPHubProxy`; it
does not make sense for it to have a `server_close` method because it
does not itself run or wrap a server.
It does however manage a pool of XML-RPC client connections which is
deleted when calling `SAMPHubProxy.disconnect()`. To be on the safe
side I added a `ServerProxyPool.shutdown()` method to the proxy pool
class which closes the client connections. This is called when shutting
down the `SAMPWebClient` server loop. Unlike the normal `SAMPClient`
class, the `SAMPWebClient` used only in tests never runs a TCP server
of its own, so calling `server_close` anywhere in here does not make
sense.1 parent d971b1c commit 05a6245
4 files changed
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
85 | 97 | | |
86 | 98 | | |
87 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | 141 | | |
144 | 142 | | |
145 | 143 | | |
| |||
0 commit comments