Minor code simplification.

This commit is contained in:
Julien Fontanet 2013-12-30 08:42:56 +01:00
parent 0894114aac
commit 13b7b72865

View File

@ -71,8 +71,9 @@ class $WebServer extends $EventEmitter
errorHandler = (error) ->
# `address()` can only be used once listening.
address = do ->
return socket if socket?
address = if socket?
socket
else
"#{host}:#{port}"
# Prints a (hopefully) helpful message if the server could not