diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Neighbour')
-rw-r--r-- | OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index 7429293..5948380 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | |||
@@ -168,22 +168,27 @@ namespace OpenSim.Services.Connectors | |||
168 | // Let's wait for the response | 168 | // Let's wait for the response |
169 | //m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall"); | 169 | //m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall"); |
170 | 170 | ||
171 | StreamReader sr = null; | ||
172 | try | 171 | try |
173 | { | 172 | { |
174 | WebResponse webResponse = helloNeighbourRequest.GetResponse(); | 173 | using (WebResponse webResponse = helloNeighbourRequest.GetResponse()) |
175 | if (webResponse == null) | ||
176 | { | 174 | { |
177 | m_log.DebugFormat( | 175 | if (webResponse == null) |
178 | "[REST COMMS]: Null reply on DoHelloNeighbourCall post from {0} to {1}", | 176 | { |
179 | thisRegion.RegionName, region.RegionName); | 177 | m_log.DebugFormat( |
178 | "[REST COMMS]: Null reply on DoHelloNeighbourCall post from {0} to {1}", | ||
179 | thisRegion.RegionName, region.RegionName); | ||
180 | } | ||
181 | |||
182 | using (Stream s = webResponse.GetResponseStream()) | ||
183 | { | ||
184 | using (StreamReader sr = new StreamReader(s)) | ||
185 | { | ||
186 | //reply = sr.ReadToEnd().Trim(); | ||
187 | sr.ReadToEnd().Trim(); | ||
188 | //m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply); | ||
189 | } | ||
190 | } | ||
180 | } | 191 | } |
181 | |||
182 | sr = new StreamReader(webResponse.GetResponseStream()); | ||
183 | //reply = sr.ReadToEnd().Trim(); | ||
184 | sr.ReadToEnd().Trim(); | ||
185 | //m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply); | ||
186 | |||
187 | } | 192 | } |
188 | catch (Exception e) | 193 | catch (Exception e) |
189 | { | 194 | { |
@@ -193,11 +198,6 @@ namespace OpenSim.Services.Connectors | |||
193 | 198 | ||
194 | return false; | 199 | return false; |
195 | } | 200 | } |
196 | finally | ||
197 | { | ||
198 | if (sr != null) | ||
199 | sr.Close(); | ||
200 | } | ||
201 | 201 | ||
202 | return true; | 202 | return true; |
203 | } | 203 | } |