Update functions.cpp

Small fix for https://github.com/ant-lafarge/QtWebsocket/issues/21