projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c254b08
)
Try to fix crash on looking up endpoint of a disconnected socket.
author
Carl Hetherington
<cth@carlh.net>
Tue, 5 Nov 2013 23:48:54 +0000
(23:48 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 5 Nov 2013 23:48:54 +0000
(23:48 +0000)
src/lib/server.cc
patch
|
blob
|
history
diff --git
a/src/lib/server.cc
b/src/lib/server.cc
index 5db6540647f3bc4f894ddc69f83715f666b3d5c6..69ca5b39aefe88c2f9c3ec14aaf622d69705daf6 100644
(file)
--- a/
src/lib/server.cc
+++ b/
src/lib/server.cc
@@
-149,17
+149,18
@@
Server::worker_thread ()
lock.unlock ();
int frame = -1;
+ string ip;
struct timeval start;
gettimeofday (&start, 0);
try {
frame = process (socket);
+ ip = socket->socket().remote_endpoint().address().to_string();
} catch (std::exception& e) {
_log->log (String::compose ("Error: %1", e.what()));
}
- string const ip = socket->socket().remote_endpoint().address().to_string();
socket.reset ();
lock.lock ();